package com.list.arraylist;

import java.util.ArrayList;
import java.util.Iterator;

public class Example1 {
public static void main(String[] args) {
	Student s1=new Student(103, "sona", 30);
	Student s2=new Student(102, "mona", 20);
	Student s3=new Student(101, "deepak", 27);
	Student s4=new Student(105, "amit", 28);
	Student s5=new Student(104, "javed", 29);
	ArrayList<Student> al=new ArrayList<Student>();
	al.add(s1);
	al.add(s2);
	al.add(s3);
	al.add(s4);
	al.add(s5);
	System.out.println(al);
	for(Student st:al){
		System.out.println(st);
	}
}
}
